import { sm2 } from "sm-crypto"; 

// const keypair = sm2.generateKeyPairHex();

const key =
  "044d5fbd59ba31145b9ba52a22cd44aeba5f6b7eaa0105adf122664bf1f84df8550eb2c2bcb951ce3eb207d68e63dedc2a8f0a0a1c3b00c1667ce043eeba089114";


//加密
export function encryptSM2(data) {
  return sm2.doEncrypt(data, key, 1);
}

//解密
export function decryptedSM2(data) {
  return sm2.doDecrypt(data, key, 1);
}
